<!DOCTYPE html>
<html lang='en'>
    <head>
        <title>绚试™ MTM管理系统(服装行业量身定制)</title>
        {include file="public/meta" /}
        <link href="/static/assets/stylesheets/plugins/fileinput/bootstrap-fileinput.css" rel="stylesheet" type="text/css" media="all" />
        <link href="/static/assets/stylesheets/plugins/fileupload/jquery.fileupload-ui.css" rel="stylesheet" type="text/css" media="all" />
        <link href="/static/assets/stylesheets/plugins/fileupload/blueimp-gallery.min.css" rel="stylesheet" type="text/css" media="all" />        
    </head>
    <body class='contrast-red'>
        {include file="public/header" /}
        {__CONTENT__}
        {include file="public/footer" /}    
    </section>
</div>
<!-- / jquery [required] -->
{include file="public/bottomjs" /}
<script src="/static/assets/javascripts/plugins/fileupload/jquery.ui.widget.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/tmpl.min.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/load-image.all.min.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/canvas-to-blob.min.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/jquery.blueimp-gallery.min.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/jquery.iframe-transport.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-process.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-image.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-audio.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-video.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-validate.js" type="text/javascript"></script>
<script src="/static/assets/javascripts/plugins/fileupload/jquery.fileupload-ui.js" type="text/javascript"></script>        
<script>
    var u = $(".active").parent('ul');
    var uc = u.attr("class");//
    if (uc == 'nav nav-stacked') {
        u.prev().attr("class", "dropdown-collapse in");
        u.show();
    }
</script>
<script>
    $(function () {
        'use strict';
        $('#fileupload').fileupload({
            url: '__URL__/mupload',
        });
        $('#fileupload').fileupload(
                'option',
                'redirect',
                window.location.href.replace(
                        /\/[^\/]*$/,
                        '/cors/result.html?%s'
                        )
                );
        $('#fileupload').fileupload('option', {
            url: '__URL__/mupload',
            disableImageResize: /Android(?!.*Chrome)|Opera/
                    .test(window.navigator.userAgent),
            maxFileSize: 10000000, //10M
            maxNumberOfFiles: {$amount},
            acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
            messages: {
                maxNumberOfFiles: '对不起您的面料空间已用完请联系管理员！',
                acceptFileTypes: 'File type not allowed',
                maxFileSize: 'File is too large',
                minFileSize: 'File is too small'
            }
        });
        if ($.support.cors) {
            $.ajax({
                url: '__URL__/mupload',
                type: 'HEAD'
            }).fail(function () {
                $('<div class="alert alert-danger"/>')
                        .text('Upload server currently unavailable - ' +
                                new Date())
                        .appendTo('#fileupload');
            });
        }

    });
</script>
</body>
</html>